<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="ldc_w"></a><b>ldc_w</b> :
  push single-word constant onto stack (wide index) : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitLdcInsn(java.lang.Object)">visitLdcInsn()</a></p><dl><dt>Description</dt><dd>ldc_w pushes a one-word constant onto the operand stack.
ldc_w takes a single parameter, <i xmlns="">&lt;</i>value<i xmlns="">&gt;</i>, which is
the value to push. The following Java types can be pushed using
ldc_w:<br></br>	int
	float
	String<br></br>Pushing a String causes a reference to a java.lang.String object to be
constructed and pushed onto the stack. Pusing an int or a float causes a
primitive value to be pushed onto the stack.<br></br>ldc_w is identical to ldc except that, in bytecode,
ldc_w uses a 16-bit index rather than an 8-bit index.</dd><dt>Exceptions</dt><dd>OutOfMemoryError - not enough memory to allocate a reference to a
String</dd><dt>Notes</dt><dd>1. Where possible, its more efficient to use one of bipush,
sipush, or one of the const instructions instead of ldc_w.<br></br>2. If the same string constant (i.e. a string with the same sequence of
characters) appears in several different class files, only one String instance
is built for that constant. The String.intern() method can be used to retrieve
the instance used for a given sequence of characters.<br></br>3. The Jasmin assembler automatically determines whether to use ldc or
ldc_w, so in Jasmin assembly files these two instructions are
synonymous.</dd><dt>See also</dt><dd><a href="ref-bipush.html">bipush</a> <a href="ref-.html"></a> <a href="ref-sipush.html">sipush</a> <a href="ref-.html"></a> <a href="ref-ldc.html">ldc</a> <a href="ref-.html"></a> <a href="ref-ldc2_w.html">ldc2_w</a> <a href="ref-.html"></a> <a href="ref-aconst_null.html">aconst_null</a> <a href="ref-.html"></a> <a href="ref-iconst_m1.html">iconst_m1</a> <a href="ref-.html"></a> <a href="ref-iconst_n.html">iconst_n</a> <a href="ref-.html"></a> <a href="ref-lconst_l.html">lconst_l</a> <a href="ref-.html"></a> <a href="ref-fconst_f.html">fconst_f</a> <a href="ref-.html"></a> <a href="ref-dconst_d.html">dconst_d</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>...</td>
<td>&lt;value&gt;</td></tr>
<tr>
<td></td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>ldc_w
opcode = 0x13 (19)
</td></tr>
<tr>
<td>
u2 
</td>
<td>index</td></tr>
</table></dd></dl></body></html>